package com.gzx.qc.modular.voice.text.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gzx.qc.modular.voice.text.entity.GzxHtVoiceText;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zjt
 * @description
 * @since 2025/1/22 10:23
 */
public interface GzxHtVoiceTextMapper extends BaseMapper<GzxHtVoiceText> {

    @Insert("<script>" +
            "INSERT INTO gzx_ht_voice_text (call_id, session_no, speaker_role, content, ext_agent_id, chat_time)" +
            "VALUES" +
            "<foreach collection='htVoiceTextList' item='item' separator=','>" +
            "(#{item.callId}, #{item.sessionNo}, #{item.speakerRole}, #{item.content}, #{item.extAgentId}, #{item.chatTime})" +
            "</foreach>" +
            "</script>")
    void insertBatch(@Param("htVoiceTextList") List<GzxHtVoiceText> htVoiceTextList);
}
